#!/bin/bash
#PBS -A QMCACC
#PBS -N test
#PBS -j oe
#PBS -l walltime=00:30:00,size=12
#PBS -V

cd $PBS_O_WORKDIR
export NUM_CORES_PER_SMP=6
export HUGETLB_MORECORE=yes
export OMP_NUM_THREADS=QMCOMP
export MPICH_RANK_REORDER_DISPLAY=1
export COUNTER1=GET_TIME_OF_DAY

export MPICH_PTL_SEND_CREDITS=-1
export MPICH_MAX_SHORT_MSG_SIZE=1024
export MPICH_PTL_UNEX_EVENTS=800000
export MPICH_UNEX_BUFFER_SIZE=16M
export MPI_MSGS_PER_PROC=32768

MAKELINK

let NP=$PBS_NNODES/$OMP_NUM_THREADS
let NPS=1

echo "Number of MPI tasks     = ", $NP
echo "Number of tasks per node= ", $NPS
echo "Number of openmp threads= ", $OMP_NUM_THREADS

export myout=QMCOUT.$BATCH_JOBID.out

aprun -n ${NP} -S ${NPS} -d ${OMP_NUM_THREADS} QMCAPP QMCINP > ${myout}

REMOVELINK

